package net.lainiao.morethread.Chapter1.demo9;

/**
 * Created by Administrator on 2017/2/28.
 */
public class Main {
    public static void main(String[] args) {
        MyTheadFactory factory=new MyTheadFactory("MyThreadFactory");
        Task task=new Task();
        for (int i = 0; i < 10; i++) {
            Thread thread=factory.newThread(task);
            thread.start();
        }
        System.out.println("Factory stats:");
        System.out.println(factory.getStates());
    }
}
